import { config } from '../../config/index';

/** 获取商铺地址信息 */
function mockFetchShopMapInfos() {
  const { delay } = require('../_utils/delay');
  const { getShopMapInfos } = require('../../model/shop_address');
  return delay(200).then(() => getShopMapInfos());
}

/** 获取商铺地址信息 */
export function fetchShopMapInfos() {
  if (config.useMock) {
    return mockFetchShopMapInfos();
  }
  return new Promise((resolve) => {
    resolve('real api');
  });
}